const express = require('express');
      bodyParser = require('body-parser');
      cookieParser = require('cookie-parser');
      template = require('./routes/template');
      app = express();
/***************配置中间件******************/
app.use(express.static('www'));
app.use(bodyParser.urlencoded({
    extended: true
}))
app.use(cookieParser())
/***************配置模板*******************/
app.engine('.html', template.__express)
app.set('view engine', 'html')
/****************页面渲染路由*****************/
app.use(require('./routes/apply'))

/***************首页请求路由化*****************/
app.use(require('./routes/index'))

/************登录,注册,用户信息请求路由化**********/
app.use(require('./routes/user'))

module.exports = app;